package com.lagou.controller;

import com.lagou.entity.StudentEntity;
import com.lagou.service.StudentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class StudentController {
    @Resource
    private StudentService studentService;

    @GetMapping("/students")
    public List<StudentEntity> queryUsers() {
        return this.studentService.queryUsers();
    }
}
